<template>
    <div class="select-search">
        <el-card>
            <el-select size="small" v-model="value" @change="handleChange" placeholder="请选择状态">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
            <el-button size="small" plain @click="search">查询</el-button>
            <el-button type="warning" size="small" plain @click="reset">重置</el-button>
        </el-card>
    </div>
</template>
<script>
export default {
    name: 'SelectSearch',
    components: {

    },
    mixins: [],
    props: {

    },
    data() {
        return {
            options: [{
                value: '0',
                label: '待审核'
            }, {
                value: '1',
                label: '审核通过'
            }, {
                value: '2',
                label: '审核不通过'
            }, {
                value: '3',
                label: '已撤销申请'
            }],
            value: ''
        }
    },
    computed: {

    },
    watch: {

    },
    mounted() {

    },
    methods: {
        search() {
            const obj = {
                keyword: this.value,
                currentPage: 1,
                pageSize: 10,
                type: ''
            }
            this.$emit('searchData', obj)
        },
        reset() {
            this.keyword = ''
            this.$emit('resetData')
        },
        handleChange(value) {
            this.value = value
        }
    }
};
</script>
<style lang='less' scoped>
.select-search {
    margin-bottom: 5px;

    .el-input {
        width: 200px;
    }

    .el-button--default.is-plain {
        color: #6e77f2;
        background: #f1f1fe;
        border-color: #c5c9fa;
        margin-left: 10px;

    }

    .el-button--default.is-plain:hover {
        color: white;
        background-color: #6e77f2;
    }
}
</style>